package de.homelabs.moonrat.config;

import java.util.Arrays;

import javolution.util.FastList;

public class MoonratConfiguration {

	//vars
	private String rootPath;
	private FastList<String> supportedDomains = new FastList<String>();
	private String fallbackTemplate = "de/homelabs/moonrat/fallbackTemplate.html";
	private FastList<String> dataProvider = new FastList<String>();
	
	/********************
	 * 	getter / setter	*
	 ********************/
	public FastList<String> getSupportedDomains() {
		return supportedDomains;
	}

	public String[] getSupportedDomainsAsArray(){
		return (String[]) supportedDomains.toArray();
	}
	
	protected void setSupportedDomains(FastList<String> supportedDomains) {
		this.supportedDomains = supportedDomains;
	}
	
	protected void setSupportedDomains(String[] domains){
		supportedDomains.addAll(Arrays.asList(domains));
	}
	
	public String getFallbackTemplate() {
		return fallbackTemplate;
	}

	public void setFallbackTemplate(String fallbackTemplate) {
		this.fallbackTemplate = fallbackTemplate;
	}

	public String getRootPath() {
		return rootPath;
	}

	public void setRootPath(String rootPath) {
		this.rootPath = rootPath;
	}

	public FastList<String> getDataProvider() {
		return dataProvider;
	}

	public void setDataProvider(String[] dataProvider) {
		this.dataProvider.addAll(Arrays.asList(dataProvider));
	}
}
